<template>
	<!-- 
		插槽content：放内容的
			title: 标题
	 -->
	<!-- 支付成功(后期替换，使得其更好维护) -->
	<van-popup :show="statePay" round position="bottom"
		:style="{backgroundColor:'rgba(34, 35, 36, 1)',borderTopLeftRadius: '40px',borderTopRightRadius: '40px'}"
		@click-overlay="overlayPopup">
		<slot name="title"></slot>
		<slot name="cont"></slot>
	</van-popup>
</template>

<script setup lang="ts">
	import { defineEmits } from 'vue'
	import { useStore } from 'vuex'
	const store = useStore()
	const emit = defineEmits(['closePaySuccess'])
	// 关闭弹出层
	const overlayPopup = () => {
		store.commit('EditShowBottom', false) // 关闭订单确认
		emit('closePaySuccess', { PopupState: false, PopupName: 'statePay' })
	}
	defineProps({
		statePay: Boolean
	})
</script>

<style lang="scss" scoped>
	::v-deep .van-button {
		width: 216px !important;
		height: 72px;
		border-radius: 10px;
	}
</style>